package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.time.LocalDateTime;

/**
 * 药品租借记录对象 sys_drug_borrow
 *
 * @author mars
 * @date 2024-05-15
 */

@Data
@ApiModel(value = "药品租借记录对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_drug_borrow")
public class SysDrugBorrow  {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 药品
     */
    @Excel(name = "药品")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "药品")
    private Long drugId;

    @TableField(exist = false)
    @ApiModelProperty(value = "药品")
    private String drugName;
    /**
     * 租借人
     */
    @Excel(name = "租借人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "租借人")
    private Long userId;
    @TableField(exist = false)
    @ApiModelProperty(value = "租借人")
    private String userName;

    /**
     * 租借时长
     */
    @Excel(name = "租借时长")
    @ApiModelProperty(value = "租借时长")
    private String borrowDuration;
    /**
     * 是否归还
     */
    @Excel(name = "是否归还")
    @ApiModelProperty(value = "是否归还")
    private String isReturn;
    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;
}
